package com.hmall.mapper;

import com.hmall.model.MallHot;
import com.hmall.util.MyMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface MallHotMapper extends MyMapper<MallHot> {

    List<Integer> listProductHot(@Param("num") int num);



    //根据productId 批量查询
    List<MallHot> batchListHot(@Param("mallProductIdList") List<Integer> mallProductIdList);

    Object batchUpdateHot(@Param("mallHotList") List<MallHot> mallHotList);

    void updateHot(@Param("mallHot") MallHot mallHot);

    //根据product_id 查询 销量 sales_volume
    int selectSalesByProductId(@Param("productId") Integer productId);

    List<MallHot> listOnlyHotList(@Param("count") int count);

    //列出热销
    List<Map> listHotList(@Param("hotCount") Integer hotCount, @Param("shopId") Integer shopId);
}